/**
 *  Copyright (c)  2011-2020 Panguso, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Panguso, 
 *  Inc. ("Confidential Information"). You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into with Panguso.
 */
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package storage.dbobject;

import java.util.ArrayList;
import java.util.UUID;

/**
 * 
 * @author Meng
 */
public class DbVersion {
	/**
	 * 
	 * string
	 */
	public static final String CL_KEY = "KEY";
	private String rowKey;
	/**
	 * 
	 * string
	 */
	public static final String CL_VERSIONNUM = "versionNum";
	private String versionNum;
	/**
	 * 
	 * string
	 */
	public static final String CL_VALIDSTARTTIME = "validStartTime";
	private String validStartTime;
	/**
	 * 
	 * string
	 */
	public static final String CL_VALIDENDTIME = "validEndTime";
	private String validEndTime;
	/**
	 * 
	 * string
	 */
	public static final String CL_UPDATETIME = "updateTime";
	private String updateTime;
	/**
	 * 
	 * string
	 */
	public static final String CL_LOGHEAD = "logHead";
	private ArrayList<String> logHeadList;

	/**
	 * 
	 * @param rowKey parameter
	 * @param versionNum parameter
	 * @param validStartTime parameter
	 * @param validEndTime parameter
	 * @param updateTime parameter
	 * @param logHeadList parameter
	 * @return
	 */
	public DbVersion(String rowKey, String versionNum, String validStartTime,
			String validEndTime, String updateTime,
			ArrayList<String> logHeadList) {
		this.rowKey = rowKey;
		this.versionNum = versionNum;
		this.validStartTime = validStartTime;
		this.validEndTime = validEndTime;
		this.updateTime = updateTime;
		this.logHeadList = logHeadList;
	}

	/**
	 * 
	 * @param versionNum parameter
	 * @param validStartTime parameter
	 * @param validEndTime parameter
	 * @param updateTime parameter
	 * @param logHeadList parameter
	 * @return
	 */
	public DbVersion(String versionNum, String validStartTime,
			String validEndTime, String updateTime,
			ArrayList<String> logHeadList) {
		this.rowKey = UUID.randomUUID().toString();
		this.versionNum = versionNum;
		this.validStartTime = validStartTime;
		this.validEndTime = validEndTime;
		this.updateTime = updateTime;
		this.logHeadList = logHeadList;
	}

	/**
	 * @return the rowKey
	 */
	public String getRowKey() {
		return rowKey;
	}

	/**
	 * 
	 * @param rowKey parameter
	 * @return
	 */
	public void setRowKey(String rowKey) {
		this.rowKey = rowKey;
	}

	/**
	 * @return the validStartTime
	 */
	public String getValidStartTime() {
		return validStartTime;
	}

	/**
	 * 
	 * @param validStartTime parameter
	 * @return
	 */
	public void setValidStartTime(String validStartTime) {
		this.validStartTime = validStartTime;
	}

	/**
	 * @return the validEndTime
	 */
	public String getValidEndTime() {
		return validEndTime;
	}

	/**
	 * 
	 * @param validEndTime parameter
	 * @return
	 */
	public void setValidEndTime(String validEndTime) {
		this.validEndTime = validEndTime;
	}

	/**
	 * @return the updateTime
	 */
	public String getUpdateTime() {
		return updateTime;
	}

	/**
	 * 
	 * @param updateTime parameter
	 * @return
	 */
	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}

	/**
	 * @return the logHeadList
	 */
	public ArrayList<String> getLogHeadList() {
		return logHeadList;
	}

	/**
	 * 
	 * @param logHeadList parameter
	 * @return
	 */
	public void setLogHeadList(ArrayList<String> logHeadList) {
		this.logHeadList = logHeadList;
	}

	/**
	 * @return the versionNum
	 */
	public String getVersionNum() {
		return versionNum;
	}

	/**
	 * 
	 * @param versionNum parameter
	 * @return
	 */
	public void setVersionNum(String versionNum) {
		this.versionNum = versionNum;
	}
}
